#!/bin/bash
#  启动fdhtd
if [ "$1" = "1" ]; then
	/usr/local/bin/fdhtd /data/conf/fdht/fdhtd.conf
fi

#  启动 tracker server
if [ "$2" = "1" ]; then
	#/etc/init.d/fdfs_trackerd start
	/usr/bin/fdfs_trackerd /data/conf/fdfs/tracker.conf restart
fi

#  分别启动客户端 A  和 客户端 B
if [ "$3" = "1" ]; then
	#/etc/init.d/fdfs_storaged start
	/usr/bin/fdfs_storaged /data/conf/fdfs/storage.conf restart
fi
#  nginx
if [ "$4" = "1" ]; then
	/usr/local/nginx/sbin/nginx -c /data/conf/nginx/nginx.conf -g  'daemon off;'
fi
fdfs_monitor /data/conf/fdfs/storage.conf
/bin/bash
